package com.ywh.hilttest.test5

import android.os.Bundle
import android.util.Log
import androidx.fragment.app.Fragment
import dagger.hilt.android.AndroidEntryPoint
import javax.inject.Inject

@AndroidEntryPoint
class FragmentObjectGlobalSingleton2 : Fragment() {

    //全局单例
    @Inject
    lateinit var singletonGlobal: SingletonGlobal

    @Inject
    lateinit var singletonSdkGlobal: SingletonSdkGlobal

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)

        Log.e("HiltTest", "SingletonGlobal-hashCode in ${this::class.java.simpleName}:${singletonGlobal.hashCode()}")
        Log.e("HiltTest", "SingletonSdkGlobal-hashCode in ${this::class.java.simpleName}:${singletonSdkGlobal.hashCode()}")

    }
}